package com.itheima.service;

import com.itheima.bean.User;
import com.itheima.dao.impl.UserImpl;

public class UserService {

    private final UserImpl userImpl = new UserImpl();

    //用户登录用  检查用户名和密码是否正确
    public User selectUser(String name, String passWord){
        return userImpl.selectUser(name, passWord);
    }
    //通过用户名查询用户是否存在
    public User selectUserByName(String name){
        return userImpl.selectUserByName(name);
    }
    //注册用户
    public void addUser(User user){
        userImpl.addUser(user);
    }
}
